//
//  DanmakuLabel.h
//  testDanmaku
//
//  Created by zhaoyun on 2017/2/13.
//  Copyright © 2017年 ainemo. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <NemoSDK/NemoSDK.h>
typedef enum DanmakuLocation
{
    Danmaku_upper,
    Danmaku_middle,
    Danmaku_lower
} DanmakuLocation;

@interface DanmakuConfigure : NSObject
@property (nonatomic) float speed;
@property (nonatomic) unsigned int duration;
@property (nonatomic) DanmakuLocation location;
@property (nonatomic) NSString *content;
@property (nonatomic, strong) NemoCaptionInfoModel *captionModel;
@end


@class DanmakuLabel;

@protocol DanmakuDelegate <NSObject>
@optional
-(void)danamkuDidFinished:(DanmakuLabel*)danmakuLabel;
@end

@interface DanmakuLabel : UILabel
@property (nonatomic, assign) BOOL isRunning;
@property (nonatomic, assign) id<DanmakuDelegate> delegate;

+(instancetype)createDanmakuLabelWithConfig:(DanmakuConfigure*)configure inView:(UIView*)view delegate:(id<DanmakuDelegate>)delegate;

-(void)start;

-(void)stop;

-(void)pause;

-(void)resume;

-(void)updateDanmakuLayoutInView:(UIView*)view size:(CGSize)size;

-(void)statusBarOrientationChange;
@end
